import 'package:boss/ui/page/miniProgram/miniProgramCommodityHotTop/mini_program_commodity_hot_top_page.dart';
import 'package:boss/ui/page/miniProgram/miniProgramCommodityRecommend/mini_program_commodity_recommend_page.dart';
import 'package:boss/ui/page/miniProgram/miniProgramCommodityWithoutSale/mini_program_commodity_without_sale_page.dart';
import 'package:boss/ui/widget/center_title_app_bar.dart';
import 'package:boss/ui/widget/form/title_switch.dart';
import 'package:boss/ui/widget/title_row_button.dart';
import 'package:flutter/material.dart';
import 'package:hi_common/hi_common.dart';
import 'package:router/annotation.dart';

@RouterConfig(MiniProgramCommodityConfigPage.pageName)
class MiniProgramCommodityConfigPage extends StatefulWidget {
  static const pageName = '/MiniProgramCommodityConfigPage';

  @override
  _MiniProgramCommodityConfigPageState createState() => _MiniProgramCommodityConfigPageState();
}

class _MiniProgramCommodityConfigPageState extends BaseState<MiniProgramCommodityConfigPage> {
  _MiniProgramCommodityConfigPageState() : super(MiniProgramCommodityConfigPage.pageName);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CenterTitleAppBar(title: '菜品设置'),
      body: SingleChildScrollView(
        padding: EdgeInsets.symmetric(horizontal: 30.w),
        child: Column(
          children: [
            TitleRowButton(
              title: '不参与扫码点餐的菜品',
              hintText: '',
              onTap: () {
                Navigator.pushNamed(context, MiniProgramCommodityWithoutSalePage.pageName);
              },
            ),
            TitleRowButton(
              title: '设置推荐菜',
              hintText: '',
              onTap: () {
                Navigator.pushNamed(context, MiniProgramCommodityRecommendPage.pageName);
              },
            ),
            TitleRowButton(
              title: '热销菜展示规则',
              hintText: '',
              onTap: () {
                Navigator.pushNamed(context, MiniProgramCommodityHotTopPage.pageName);
              },
            ),
            TitleSwitch(
              title: '老顾客点菜时展示常点菜品',
              value: true,
            ),
          ],
        ),
      ),
    );
  }
}
